package com.ropeok.common;

import lombok.ToString;

/**
 * @BelongsProject: training-mission
 * @BelongsPackage: com.ropeok.common
 * @Author: zhofeifan
 * @CreateTime: 2022-08-29  12:54
 * @Description: 响应格式统一
 * @Version: 1.0
 */
// @JsonInclude()
public class ResponseResult<T> {
    //状态码，校验实际操作是否成功还是失败
    private Integer code;
    //提示信息
    private  String msg;
    //结果
    private T data;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public ResponseResult(Integer code, String msg, T data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public ResponseResult(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
